package com.lhb.aop;

import com.lhb.ApplicationMain;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @Program: spring
 * @Description:
 * @Author: LHB
 * @Version: v0.0.1
 * @Time: 2021-09-03 13:51
 **/
@Configuration
@ComponentScan
public class AopStarter {
	public static void main(String[] args) {
		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(ApplicationMain.class);
		System.out.println("ssssssssssssssssssssssssssssss");
		Calculate simpleCalculate = applicationContext.getBean("simpleCalculate", Calculate.class);
		int add = simpleCalculate.add(1, 1);
		System.out.println(add);
	}
}
